package Basic

object RangeTest {
  def main(args: Array[String]): Unit = {
    //创建1-5的数值序列
    val r = new Range(1, 5, 1)
    val r1 = 1 to 5
    //1-5且不包含5的序列
    val r2 = 1 until 5
    //1-10,包含终点步长为2的
    val r3 = 1 to 10 by 2
    //创建一个Float类型的数值序列，从0.5f到5.9f，步长为0.3f
    val r4 = 0.5f to 5.9f by 0.3f
    println(r)
    println(r1)
    println(r2)
    println(r3)
    println(r4)

  }
}
